﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;

namespace W.Carrier.Repostiory
{
    public interface IRepository <T> where T : class,new()
    {
        Task<int> AddAsync(T t);
        Task<List<T>> GetAllAsync();
        Task<List<T>> GetAsync(Expression<Func<T,bool>> expr);
        Task<T> GetModelAsync(int id);
        Task<int> Update(T t);
        Task<int> UpdateRange(List<T> entities);
    }
}
